﻿namespace ApiLib.Common.Attributes;

/// <summary>
/// 自定义权限
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
public class PermissionAttribute : Attribute
{
    /// <summary>
    /// 
    /// </summary>
    public PermissionAttribute()
    {
        Perm = "";
        Name = "";
        Role = "";
        Description = "";
    }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="perm"></param>
    public PermissionAttribute(string perm)
    {
        Perm = perm;
        Name = "";
        Role = "";
        Description = "";
    }

    /// <summary>
    /// 权限
    /// </summary>
    public string Perm { get; set; }
    
    /// <summary>
    /// 角色
    /// </summary>
    public string Role { get; set; }

    /// <summary>
    /// 名称
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string Description { get; set; }
}